package cn.wolfcode.business.service;

import cn.wolfcode.business.domain.BusAudit;

import java.io.InputStream;
import java.util.List;

public interface BusAuditService {
    List<BusAudit> getAuditList();

    /**
     * 发起审核时首先向中间表中插入数据
     * @param busAudit
     * @return
     */
    Integer insert(BusAudit busAudit);

    /**
     * 插入数据成功后，启动流程实例，更新流程实例id
     * @param businessKey
     * @param processInstanceId
     * @return
     */
    Integer updateInstanceId(Long businessKey, String processInstanceId);

    /**
     * 根据流程实例查询当前的流程图
     * @param instanceId
     * @return
     */
    InputStream getAuditprogressPng(Long instanceId);

    /**
     * 撤销流程实例
     * @param id
     * @return
     */
    Integer deleteCancelAudit(Long id);
}
